Transition
A transition is used to describe how the state of the
process changes as the result of some action of the process. It is composed of
three parts.
- Select is used to bind a variable nondeterministically to a value
in a range. The format of this declaration is "x:{M..N}". This will
non-deterministically bind x to an
integer in the range M to N. The Select is useful to
intialize variables with a random value.
-
Event is the name of the action making the process to
change.
-
Guard, a boolean expression, is the condition of the
action to happen.
-
Program is the description of the action. It defines what
the new state of the process from the current state if this action is
trigered. It is a sequence of command and may contain while-loops,
if-then-else.
The transition label is represented as the below format:
[guard]event{program}. In the above picture, the first link in red color,
"[Knight == 0 && Lady == 0] go_knight_lady {Knight = 1; Lady=
1; time
= time+LADY;}", means that the process
can move from state North to state South if the guard "Knight == 0 &&
Lady == 0" is satisfied. Then after this move, the process will change to new
state where Knight = 1, Lady = 1 and time' = time + LADY ( Knight, Lady, time',
time are variables, LADY is constant and time', time are the value of time
variable after and before the move respectively.
There are some action which can do with the Transition
-
Create Transition: Select the Add Link function then select the first
state and the second state. Between selections of the two states, you can
click in the canvas to create a new Nail. Nail is a small dot in yellow color.
It is used to divide the transition in segments.
- Delete Transition: Select the link then click the Delete function or
select Delete function from that link's context menu.
-
Create Nail: Right click on the link and select New Nail.
-
Delete Nail: Select the Nail then select the delete function from the
toolbar or its context menu.
-
Move Nail: Select the Nail and drag the nail to the desired
position.
Copyright © 2007-2012 Semantic Engineering Pte. Ltd.